package io;

import java.io.File;

public class IODemo6 {
    public static void main(String[] args) {
//        File src = new File("./test.txt");
//        File dest = new File("./test2.txt");
//        src.renameTo(dest);//重命名
        File src = new File("./test2.txt");
        File dest = new File("./aaa/test2.txt");
        src.renameTo(dest);//把文件移动
    }
}
